

if (uname) {
    // let avatar =
    //   localStorage.getItem("avatar") || sessionStorage.getItem("avatar");
    // console.log(avatar);
  
    document.write(`
      <!-- 已登录 -->
      <div class="default" style="">
      <div class="setting">
          <a href="">
          <div class="icon">
              <i class="iconfont icon-setting_iconx"></i>
          </div>
          </a>
      </div>
      <div class="head-img-row">
          <a href="./member.html">
          <img src="./imgs/kai.webp" alt="">
          </a>
      </div>
      <div class="nickname-row">
          <a href="./member.html">
          <p class="user-name">${uname}</p>
          </a>
          <a href="./member.html">
          <i class=" iconfont iconfont_level icon-lable_level_undefined"></i>
          </a>
      </div>
      <div class="fn-row clearfix">
          <div class="fn-item">
          <a href="./order.html">
              <div class="icon">
              <i class="iconfont icon-order_iconx iconfont icon-tubiaolunkuo-"></i>
              </div>
              <p class="fn-name">我的订单</p>
          </a>
          </div>
          <div class="fn-item">
          <a href="./collect.html">
              <div class="icon">
              <i class="iconfont icon-collection_iconx icon-shoucang"></i>
              </div>
              <p class="fn-name">我的收藏</p>
          </a>
          </div>
      </div>
      <div class="fn-row clearfix">
          <div class="fn-item">
          <a href="./member.html">
              <div class="icon"><i class="iconfont icon-money_iconx icon-yue"></i></div>
              <p class="fn-name">余额</p>
          </a>
          </div>
          <div class="fn-item">
          <a href="./member.html">
              <div class="icon"><i class="iconfont icon-more_iconx icon-gengduo"></i></div>
              <p class="fn-name">更多</p>
          </a>
          </div>
      </div>
      </div>
      <!-- 已登录 -->
      `);
  } else {
    document.write(`
          <!--未登录 -->
          <div class="default">
          <div class="head-img-row">
              <img src="./imgs/avatar.jpeg" alt="">
          </div>
          <p class="user-name">Hi！你好</p><a class="btn-login" href="./registry.html">注册</a>
          <a class="btn-login" href="./login.html">立即登录</a>
          </div>
          <!-- 未登录 -->
      `);
  }
  